﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once 

#include "IDbObject.h"
#include "GcmpModelInterface.h"
#include "RegenDataId.h"

namespace gcmp
{
    class IGraphicsElementShape;
    class IElement;
    /// \brief 符号图形表达组件接口
    class GCMP_MODEL_INTERFACE_EXPORT ISymbolGraphicsElementShapeComponent : public IDbObject
    {
        DEFINE_CAST_DERIVED(gcmp::ISymbolGraphicsElementShapeComponent, gcmp::IDbObject);

    public:
        /// \brief 获得符号的图形表达数据
        /// \return 返回符号图形表达指针
        virtual const IGraphicsElementShape* GetSymbolGraphicsElementShape() const = 0;

        /// \brief 获得符号的图形表达数据
        /// \return 返回符号图形表达指针
        virtual IGraphicsElementShape* GetSymbolGraphicsElementShape() =0;

        /// \brief 设置符号的图形表达数据
        ///
        /// 设置后会触发关联更新
        /// \param opGraphicsElementShape 新的符号图形表达数据指针
        /// \return 
        virtual void SetSymbolGraphicsElementShape(OwnerPtr<IGraphicsElementShape> opGraphicsElementShape) = 0;

        /// \brief 获得Element符号的图形表达关联更新变化Id
        /// \return Element符号的图形表达关联更新变化Id
        virtual RegenDataId GetSymbolGraphicsElementShapeRdId() const = 0;
    public:
        /// \brief 设置该行为所属Element
        /// \param pOwnerElement 所属Element
        /// \return bool
        virtual bool SetOwnerElement(IElement* pOwnerElement) = 0;

        /// \brief 获得该行为所属的Element
        /// \return 所属的Element
        virtual IElement* GetOwnerElement() = 0;

        /// \brief 获得该行为所属的Element
        /// \return 所属的Element
        virtual const IElement* GetOwnerElement() const = 0;
    };

}



